package cn.itcast.itcaststore.service;
import java.sql.SQLException;
import java.util.List;
import cn.itcast.itcaststore.dao.ProductDao;
import cn.itcast.itcaststore.domain.PageBean;
import cn.itcast.itcaststore.domain.Product;

import cn.itcast.itcaststore.exception.FindProductByIdException;

public class ProductService {
	private ProductDao dao = new ProductDao();
	// 根据id查找商品
	public Product findProductById(String id) throws FindProductByIdException {
		try {
			return dao.findProductById(id);
		} catch (SQLException e) {
			e.printStackTrace();
			throw new FindProductByIdException("根据ID查找商品失败");
		}
	}
	public PageBean findProductByPage(int currentPage, int currentCount, String category) {
		// TODO Auto-generated method stub
		return null;
	}
	public PageBean findBookByName(int currentPage, int currentCount, String searchfield) {
		// TODO Auto-generated method stub
		return null;
	}
	public List<Object[]> getWeekHotProduct() {
		// TODO Auto-generated method stub
		return null;
	}
	
}
